package dto;

import org.springframework.web.multipart.MultipartFile;

public class MemberDTO {
	private String member_id;
	private String member_password;
	private String last_name;
	private String first_name;
	private String birthday;
	private String phone_no;
	private String address;
	private String regist_date;
	private String picture_filename;
	private String member_gender;
	private MultipartFile upfile;
	// 이 부분은 DB에서 쓰지 않는 데이터
	private String dateFordisplay;
	private int amount;
	
	public MemberDTO() {
		super();
	}

	// default
	public MemberDTO(String member_id, String member_password,
			String last_name, String first_name, String member_gender) {
		super();
		this.member_id = member_id;
		this.member_password = member_password;
		this.last_name = last_name;
		this.first_name = first_name;
		this.member_gender = member_gender;
	}

	public MemberDTO(String member_id, String member_password,
			String last_name, String first_name, String birthday,
			String phone_no, String address, String regist_date,
			String picture_filename, String member_gender, MultipartFile upfile) {
		super();
		this.member_id = member_id;
		this.member_password = member_password;
		this.last_name = last_name;
		this.first_name = first_name;
		this.birthday = birthday;
		this.phone_no = phone_no;
		this.address = address;
		this.regist_date = regist_date;
		this.picture_filename = picture_filename;
		this.member_gender = member_gender;
		this.upfile = upfile;
	}

	public MemberDTO(String member_id, String member_password,
			String last_name, String first_name, String birthday,
			String member_gender) {
		super();
		this.member_id = member_id;
		this.member_password = member_password;
		this.last_name = last_name;
		this.first_name = first_name;
		this.birthday = birthday;
		this.member_gender = member_gender;
	}

	public MemberDTO(String member_id, String member_password,
			String last_name, String first_name, String birthday,
			String member_gender, MultipartFile upfile) {
		super();
		this.member_id = member_id;
		this.member_password = member_password;
		this.last_name = last_name;
		this.first_name = first_name;
		this.birthday = birthday;
		this.member_gender = member_gender;
		this.upfile = upfile;
	}

	public MemberDTO(String member_id, String member_password,
			String last_name, String first_name, String birthday,
			String phone_no, String address, String member_gender) {
		super();
		this.member_id = member_id;
		this.member_password = member_password;
		this.last_name = last_name;
		this.first_name = first_name;
		this.birthday = birthday;
		this.phone_no = phone_no;
		this.address = address;
		this.member_gender = member_gender;
	}

	public MemberDTO(String member_id, String member_password,
			String last_name, String first_name, String birthday,
			String address, String member_gender, MultipartFile upfile) {
		super();
		this.member_id = member_id;
		this.member_password = member_password;
		this.last_name = last_name;
		this.first_name = first_name;
		this.birthday = birthday;
		this.address = address;
		this.member_gender = member_gender;
		this.upfile = upfile;
	}
	

	public MemberDTO(String member_id, String member_password,
			String last_name, String first_name, String birthday,
			String phone_no, String address, String regist_date,
			String picture_filename, String member_gender,
			MultipartFile upfile, String dateFordisplay, int amount) {
		super();
		this.member_id = member_id;
		this.member_password = member_password;
		this.last_name = last_name;
		this.first_name = first_name;
		this.birthday = birthday;
		this.phone_no = phone_no;
		this.address = address;
		this.regist_date = regist_date;
		this.picture_filename = picture_filename;
		this.member_gender = member_gender;
		this.upfile = upfile;
		this.dateFordisplay = dateFordisplay;
		this.amount = amount;
	}

	public String getDateFordisplay() {
		return dateFordisplay;
	}

	public void setDateFordisplay(String dateFordisplay) {
		this.dateFordisplay = dateFordisplay;
	}

	public String getMember_id() {
		return member_id;
	}

	public void setMember_id(String member_id) {
		this.member_id = member_id;
	}

	public String getMember_password() {
		return member_password;
	}

	public void setMember_password(String member_password) {
		this.member_password = member_password;
	}

	public String getLast_name() {
		return last_name;
	}

	public void setLast_name(String last_name) {
		this.last_name = last_name;
	}

	public String getFirst_name() {
		return first_name;
	}

	public void setFirst_name(String first_name) {
		this.first_name = first_name;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public String getPhone_no() {
		return phone_no;
	}

	public void setPhone_no(String phone_no) {
		this.phone_no = phone_no;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getRegist_date() {
		return regist_date;
	}

	public void setRegist_date(String regist_date) {
		this.regist_date = regist_date;
	}

	public String getPicture_filename() {
		return picture_filename;
	}

	public void setPicture_filename(String picture_filename) {
		this.picture_filename = picture_filename;
	}

	public String getMember_gender() {
		return member_gender;
	}

	public void setMember_gender(String member_gender) {
		this.member_gender = member_gender;
	}

	public MultipartFile getUpfile() {
		return upfile;
	}

	public void setUpfile(MultipartFile upfile) {
		this.upfile = upfile;
	}
	

	public int getAmount() {
		return amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	@Override
	public String toString() {
		return "MemberDTO [member_id=" + member_id + ", member_password="
				+ member_password + ", last_name=" + last_name
				+ ", first_name=" + first_name + ", birthday=" + birthday
				+ ", phone_no=" + phone_no + ", address=" + address
				+ ", regist_date=" + regist_date + ", picture_filename="
				+ picture_filename + ", member_gender=" + member_gender
				+ ", upfile=" + upfile + ", dateFordisplay=" + dateFordisplay
				+ ", amount=" + amount + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((address == null) ? 0 : address.hashCode());
		result = prime * result + amount;
		result = prime * result
				+ ((birthday == null) ? 0 : birthday.hashCode());
		result = prime * result
				+ ((dateFordisplay == null) ? 0 : dateFordisplay.hashCode());
		result = prime * result
				+ ((first_name == null) ? 0 : first_name.hashCode());
		result = prime * result
				+ ((last_name == null) ? 0 : last_name.hashCode());
		result = prime * result
				+ ((member_gender == null) ? 0 : member_gender.hashCode());
		result = prime * result
				+ ((member_id == null) ? 0 : member_id.hashCode());
		result = prime * result
				+ ((member_password == null) ? 0 : member_password.hashCode());
		result = prime * result
				+ ((phone_no == null) ? 0 : phone_no.hashCode());
		result = prime
				* result
				+ ((picture_filename == null) ? 0 : picture_filename.hashCode());
		result = prime * result
				+ ((regist_date == null) ? 0 : regist_date.hashCode());
		result = prime * result + ((upfile == null) ? 0 : upfile.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MemberDTO other = (MemberDTO) obj;
		if (address == null) {
			if (other.address != null)
				return false;
		} else if (!address.equals(other.address))
			return false;
		if (amount != other.amount)
			return false;
		if (birthday == null) {
			if (other.birthday != null)
				return false;
		} else if (!birthday.equals(other.birthday))
			return false;
		if (dateFordisplay == null) {
			if (other.dateFordisplay != null)
				return false;
		} else if (!dateFordisplay.equals(other.dateFordisplay))
			return false;
		if (first_name == null) {
			if (other.first_name != null)
				return false;
		} else if (!first_name.equals(other.first_name))
			return false;
		if (last_name == null) {
			if (other.last_name != null)
				return false;
		} else if (!last_name.equals(other.last_name))
			return false;
		if (member_gender == null) {
			if (other.member_gender != null)
				return false;
		} else if (!member_gender.equals(other.member_gender))
			return false;
		if (member_id == null) {
			if (other.member_id != null)
				return false;
		} else if (!member_id.equals(other.member_id))
			return false;
		if (member_password == null) {
			if (other.member_password != null)
				return false;
		} else if (!member_password.equals(other.member_password))
			return false;
		if (phone_no == null) {
			if (other.phone_no != null)
				return false;
		} else if (!phone_no.equals(other.phone_no))
			return false;
		if (picture_filename == null) {
			if (other.picture_filename != null)
				return false;
		} else if (!picture_filename.equals(other.picture_filename))
			return false;
		if (regist_date == null) {
			if (other.regist_date != null)
				return false;
		} else if (!regist_date.equals(other.regist_date))
			return false;
		if (upfile == null) {
			if (other.upfile != null)
				return false;
		} else if (!upfile.equals(other.upfile))
			return false;
		return true;
	}

	
	
}
